package edu.pku.sei.transformation.mtparser;

import lpg.runtime.*;

/**
 *<b>
 *<li>Rule 47:  DeleteExpr ::= delete ( AtomicExpr )
 *</b>
 */
public class DeleteExpr extends Ast implements IDeleteExpr
{
    private IAtomicExpr _AtomicExpr;

    public IAtomicExpr getAtomicExpr() { return _AtomicExpr; }

    public DeleteExpr(IToken leftIToken, IToken rightIToken,
                      IAtomicExpr _AtomicExpr)
    {
        super(leftIToken, rightIToken);

        this._AtomicExpr = _AtomicExpr;
        initialize();
    }

    public boolean equals(Object o)
    {
        if (o == this) return true;
        if (! (o instanceof DeleteExpr)) return false;
        if (! super.equals(o)) return false;
        DeleteExpr other = (DeleteExpr) o;
        if (! _AtomicExpr.equals(other._AtomicExpr)) return false;
        return true;
    }

    public int hashCode()
    {
        int hash = super.hashCode();
        hash = hash * 31 + (_AtomicExpr.hashCode());
        return hash;
    }

    public void accept(Visitor v) { v.visit(this); }
    public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
    public Object accept(ResultVisitor v) { return v.visit(this); }
    public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
}


